# -*- coding: utf-8 -*-
"""
Created on Tue Mar  3 12:47:00 2020

@author: Monstare
"""

import geopandas as gpd


def identity(pointname,regionname):
    point=gpd.read_file("..\\data\\result\\"+str(pointname))
    region=gpd.read_file("..\\data\\result\\"+str(regionname))
    studypoint=gpd.sjoin(point,region,op='within')
    shapedata = gpd.GeoDataFrame(studypoint)
    shapedata.crs={'init':'epsg:4326'}
    shapedata.to_file("..\\data\\result\\studydata.shp",encoding = "utf-8")
    return "studydata.shp"

studydataname=identity(pointname,regionname)